package com.huatai.bpmn.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import groovy.transform.Field;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.checkerframework.common.aliasing.qual.Unique;
import org.springframework.beans.factory.annotation.Required;
import org.w3c.dom.ls.LSInput;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *	字典表实体
 * </p>
 *
 * @author yxy
 * @since 2023-07-07
 */
@Data
@TableName("pmp_dic")
@ApiModel(value = "字典表实体",description = "字典表实体")
public class DicEntity implements Serializable {


    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 名称
     */
	@ApiModelProperty("名称")
    private String jsonTitle;

    /**
     * 父节点id
     */
	@ApiModelProperty("父节点id")
    private String pid;


    /**
     * 编码
     */
	@NotNull(message = "编码不能为空")
	@ApiModelProperty("编码")
	@Unique
    private String code;



	@ApiModelProperty("排序")
    private BigDecimal sort;

	@TableField(exist = false)
	private List<DicEntity> children;
}
